package com.example.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
* <p>
* 物品表
* </p>
*
* @author wsl
* @since 2022-04-11
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "Goods对象", description = "物品表")
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("物品编号")
    private String code;

    @ApiModelProperty("物品名称")
    private String name;

    @ApiModelProperty("物品组编号")
    private Integer gsTypeId;

    @ApiModelProperty("物品组名称")
    @TableField(exist = false)
    private String gsTypeName;

    @ApiModelProperty("是否为消耗品")
    private Integer isConsumable;

    @ApiModelProperty("规格")
    private String spec;

    @ApiModelProperty("数量")
    private Integer num;

    @ApiModelProperty("物品单价")
    private BigDecimal unitPrice;

    @ApiModelProperty("是否可用")
    private Integer enabled;

    @ApiModelProperty("当前状态")
    private Integer status;

    @ApiModelProperty("修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("是否删除")
    private Integer deleted;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("物品类别")
    @TableField(exist = false)
    private GsType gsType;
}
